<?php

/**
 * Created by PhpStorm.
 * Author: GJX
 * Time: 2023/10/10 13:55
 * Desc: 充值应用请求参数验证
 */
class Request_Api_V2_Wallet extends Request_Api_V2_Base
{
    public function __construct($request_param)
    {
        parent::__construct($request_param);

        //自定义规则
        $this->validation->rule('mid',array('Rule_Member','need_member'));
    }

    public function order()
    {
        $this->rules = [
            ['wallet_id', ['not_empty', 'digit']],
        ];

        return $this;
    }

    public function product_deduction()
    {
        $this->rules = [
            ['order_sn', ['not_empty']],
        ];

        return $this;
    }

    public function wallet_details_list()
    {
        $this->rules = [
            ['filter_id', ['digit']],
            ['page', ['digit', $this->rule_min(1)]],
            ['pagesize', ['digit', $this->rule_min(1)]],
        ];

        return $this;
    }
}